home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / sap.arc / COMM.H next >
C/C++ Source or Header  |  1988-04-06  |  2KB  |  79 lines

  1. /*****************************************************************************
  2.  *
  3.  * Program Name:  COMMUNICATION_DEFINITIONS
  4.  *
  5.  * Filename:      comm.h
  6.  *
  7.  * Date Created:  March 22, 1988
  8.  *
  9.  * Version:          1.0
  10.  *
  11.  * Programmers:      Bryan Sparks
  12.  *
  13.  * Comments:      This file defines (typedef) structures needed to perform
  14.  *                  IPX and SAP (SPX definitions are included also).
  15.  *
  16.  ****************************************************************************/
  17. struct    IPXAddress
  18. {
  19.     unsigned char    Network[4];    /* high-low */
  20.     unsigned char    Node[6];    /* high-low */
  21.     unsigned int     Socket;        /* high-low */
  22. };
  23.  
  24. typedef struct IPXPacketStructure
  25. {
  26.     unsigned int                PacketCheckSum;            /* high-low */
  27.     unsigned int                PacketLength;            /* high-low */
  28.     unsigned char                PacketTransportControl;
  29.     unsigned char                PacketType;
  30.     struct IPXAddress            Destination;
  31.     struct IPXAddress            Source;
  32. } IPXPacket;
  33.  
  34. typedef struct SPXPacketStructure
  35. {
  36.     unsigned int                PacketCheckSum;            /* high-low */
  37.      unsigned int                PacketLength;            /* high-low */
  38.     unsigned char                PacketTransportControl;
  39.     unsigned char                PacketType;
  40.     struct IPXAddress            Destination;
  41.     struct IPXAddress            Source;
  42.     unsigned char                ConnectionControl;
  43.     unsigned char                DatastreamType;
  44.     unsigned int                SourceConnectionID;        /* high-low */
  45.     unsigned int                DestinationConnectionID;    /* high-low */
  46.     unsigned int                SequenceNumber;            /* high-low */
  47.     unsigned int                AcknowledgeNumber;         /* high-low */
  48.     unsigned int                AllocationNumber;        /* high-low */
  49. } SPXPacket;
  50.  
  51. struct    ECBFragment
  52. {
  53.     char far             *Address; 
  54.     unsigned int        Size;             /* low-high */
  55. };
  56.  
  57. typedef struct ECBStructure 
  58. {
  59.     unsigned int                Link[2];                
  60.     char far                    *ESRAddress;            /* offset-segment */
  61.     unsigned char                InUseFlag;
  62.     unsigned char                CompletionCode;
  63.     unsigned int                ECBSocket;                /* high-low */
  64.     unsigned char                IPXWorkspace[4];        
  65.     unsigned char                DriverWorkspace[12];    
  66.     unsigned char                ImmediateAddress[6];    /* high-low */
  67.     unsigned int                FragmentCount;            /* low-high */
  68.     struct ECBFragment            FragmentDescriptor[2];
  69. } ECB;
  70.  
  71. typedef struct SAPDataStructure
  72. {
  73.     unsigned int        InfoType;
  74.     unsigned int        ServerType;
  75.     unsigned char        ServerName[48];
  76.     struct IPXAddress    Address;
  77.     unsigned int         IntermediateNetworks;
  78. } SAPData;
  79.